Don't draw bevels around active, RELIEF_NONE buttons that aren't
authorMatthias Clasen <maclas@gmx.de>
Fri, 13 Feb 2004 00:31:19 +0000 (00:31 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 13 Feb 2004 00:31:19 +0000 (00:31 +0000)
Fri Feb 13 01:31:44 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around
active, RELIEF_NONE buttons that aren't depressed. This improves
the appearance of buttons in notebook tabs.  (#109213, reported
by Benjamin Otte, patch by Rodney Dawes)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkbutton.c

index 7636211d628acfa89d43b8c9d7cab4247c13a724..5dff67430965bf93164514e2985ea9344b0d96c5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Fri Feb 13 01:31:44 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around
+       active, RELIEF_NONE buttons that aren't depressed. This improves
+       the appearance of buttons in notebook tabs.  (#109213, reported
+       by Benjamin Otte, patch by Rodney Dawes)
+
 Fri Feb 13 01:06:08 2004  Matthias Clasen  <maclas@gmx.de>
 
        * demos/gtk-demo/main.c (read_line): Protect getc_unlocked() by 
index 7636211d628acfa89d43b8c9d7cab4247c13a724..5dff67430965bf93164514e2985ea9344b0d96c5 100644 (file)
@@ -1,3 +1,10 @@
+Fri Feb 13 01:31:44 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around
+       active, RELIEF_NONE buttons that aren't depressed. This improves
+       the appearance of buttons in notebook tabs.  (#109213, reported
+       by Benjamin Otte, patch by Rodney Dawes)
+
 Fri Feb 13 01:06:08 2004  Matthias Clasen  <maclas@gmx.de>
 
        * demos/gtk-demo/main.c (read_line): Protect getc_unlocked() by 
index 7636211d628acfa89d43b8c9d7cab4247c13a724..5dff67430965bf93164514e2985ea9344b0d96c5 100644 (file)
@@ -1,3 +1,10 @@
+Fri Feb 13 01:31:44 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around
+       active, RELIEF_NONE buttons that aren't depressed. This improves
+       the appearance of buttons in notebook tabs.  (#109213, reported
+       by Benjamin Otte, patch by Rodney Dawes)
+
 Fri Feb 13 01:06:08 2004  Matthias Clasen  <maclas@gmx.de>
 
        * demos/gtk-demo/main.c (read_line): Protect getc_unlocked() by 
index 7636211d628acfa89d43b8c9d7cab4247c13a724..5dff67430965bf93164514e2985ea9344b0d96c5 100644 (file)
@@ -1,3 +1,10 @@
+Fri Feb 13 01:31:44 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around
+       active, RELIEF_NONE buttons that aren't depressed. This improves
+       the appearance of buttons in notebook tabs.  (#109213, reported
+       by Benjamin Otte, patch by Rodney Dawes)
+
 Fri Feb 13 01:06:08 2004  Matthias Clasen  <maclas@gmx.de>
 
        * demos/gtk-demo/main.c (read_line): Protect getc_unlocked() by 
index 7636211d628acfa89d43b8c9d7cab4247c13a724..5dff67430965bf93164514e2985ea9344b0d96c5 100644 (file)
@@ -1,3 +1,10 @@
+Fri Feb 13 01:31:44 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around
+       active, RELIEF_NONE buttons that aren't depressed. This improves
+       the appearance of buttons in notebook tabs.  (#109213, reported
+       by Benjamin Otte, patch by Rodney Dawes)
+
 Fri Feb 13 01:06:08 2004  Matthias Clasen  <maclas@gmx.de>
 
        * demos/gtk-demo/main.c (read_line): Protect getc_unlocked() by 
index 89725ce47314a404643f60b3d10545d1f559b3f9..c47b453ef393d4757407bbc1250b4f99023d0ae6 100644 (file)
@@ -997,9 +997,8 @@ _gtk_button_paint (GtkButton    *button,
          height -= 2 * (focus_width + focus_pad);
        }
 
-      if ((button->relief != GTK_RELIEF_NONE) ||
-         ((GTK_WIDGET_STATE(widget) != GTK_STATE_NORMAL) &&
-          (GTK_WIDGET_STATE(widget) != GTK_STATE_INSENSITIVE)))
+      if (button->relief != GTK_RELIEF_NONE || button->depressed ||
+         GTK_WIDGET_STATE(widget) == GTK_STATE_PRELIGHT)
        gtk_paint_box (widget->style, widget->window,
                       state_type,
                       shadow_type, area, widget, "button",